import request from '@/utils/request'

// 查询物料生成规则列表
export function listIteminfoGz(query) {
  return request({
    url: '/base/iteminfoGz/list',
    method: 'get',
    params: query
  })
}

// 查询物料生成规则详细
export function getIteminfoGz(id) {
  return request({
    url: '/base/iteminfoGz/' + id,
    method: 'get'
  })
}

// 新增物料生成规则
export function addIteminfoGz(data) {
  return request({
    url: '/base/iteminfoGz',
    method: 'post',
    data: data
  })
}

// 修改物料生成规则
export function updateIteminfoGz(data) {
  return request({
    url: '/base/iteminfoGz',
    method: 'put',
    data: data
  })
}

// 删除物料生成规则
export function delIteminfoGz(id) {
  return request({
    url: '/base/iteminfoGz/' + id,
    method: 'delete'
  })
}
//生成物料信息
export function addItemInfo(id) {
  return request({
    url: '/base/iteminfoGz/addItemInfo/' + id,
    method: 'get'
  })
}
